package com.zgjkhis.modules.enums;

import lombok.Getter;

/**
 * @author yxl
 */

@Getter
public enum AdditionalEnum {

	/*
	 * @Author yzq
	 * @Description 材料费用
	 * @Date 2021/9/14 14:55
	 * @Param
	 * @return
	 **/
	CL(1, "材料费用"),
	/*
	 * @Author yzq
	 * @Description 检验检查
	 * @Date 2021/9/14 14:55
	 * @Param
	 * @return
	 **/
	JCJY(2, "检验检查"),
	/*
	 * @Author yzq
	 * @Description 治疗项目
	 * @Date 2021/9/14 14:55
	 * @Param
	 * @return
	 **/
	ZL(3, "治疗项目"),
	/*
	 * @Author yzq
	 * @Description 其他费用
	 * @Date 2021/9/14 14:55
	 * @Param
	 * @return
	 **/
	OHTER(4, "其他费用"),




	;

	private final Integer code;

	private final String value;

	AdditionalEnum(Integer code, String value) {
		this.code = code;
		this.value = value;
	}

	public static String findByCode(Integer code) {
		for (AdditionalEnum drugTypeEnum : AdditionalEnum.values()) {
			if (drugTypeEnum.getCode().equals(code)) {
				return drugTypeEnum.value;
			}
		}
		return "";
	}
	public static Integer findByValue(String value) {
		for (AdditionalEnum drugTypeEnum : AdditionalEnum.values()) {
			if (drugTypeEnum.getValue().equals(value)) {
				return drugTypeEnum.code;
			}
		}
		return 0;
	}

}
